﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
					xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
					xmlns:seui="clr-namespace:SqlExport">

	<LinearGradientBrush x:Key="TabButtonNormalBackground" EndPoint="0,1" StartPoint="0,0">
		<GradientStop Color="#F3F3F3" Offset="0"/>
		<GradientStop Color="#EBEBEB" Offset="0.5"/>
		<GradientStop Color="#DDDDDD" Offset="0.5"/>
		<GradientStop Color="#CDCDCD" Offset="1"/>
	</LinearGradientBrush>
	<LinearGradientBrush x:Key="TabButtonOverBackground" EndPoint="0,1" StartPoint="0,0">
		<GradientStop Color="#FFFAFAFA" Offset="0"/>
		<GradientStop Color="#FFE0E0E3" Offset="1"/>
	</LinearGradientBrush>
	<LinearGradientBrush x:Key="TabButtonPressedBackground" EndPoint="0,1" StartPoint="0,0">
		<GradientStop Color="#FFE0E0E2" Offset="0"/>
		<GradientStop Color="#FFF8F8F8" Offset="1"/>
	</LinearGradientBrush>
	<SolidColorBrush x:Key="TabButtonNormalBorder" Color="#FF969696"/>
    
    <Style x:Key="DialogButtons" TargetType="{x:Type Button}">
        <Setter Property="Width" Value="75"/>
    </Style>

	<Style x:Key="TabItemButtonStyle" TargetType="{x:Type ButtonBase}">
		<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
		<Setter Property="Background" Value="{StaticResource TabButtonNormalBackground}"/>
		<Setter Property="BorderBrush" Value="{StaticResource TabButtonNormalBorder}"/>
		<Setter Property="BorderThickness" Value="1"/>
		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
		<Setter Property="HorizontalContentAlignment" Value="Center"/>
		<Setter Property="VerticalContentAlignment" Value="Center"/>
		<Setter Property="Padding" Value="4"/>
		<Setter Property="HorizontalAlignment" Value="Center" />
		<Setter Property="Margin" Value="3,0,3,0" />
		<Setter Property="VerticalAlignment" Value="Center" />
		<Setter Property="Width" Value="16" />
		<Setter Property="Height" Value="16" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ButtonBase}">
					<Grid>
						<Border x:Name="Chrome" 
								SnapsToDevicePixels="true" 
								Background="{TemplateBinding Background}" 
								BorderBrush="{TemplateBinding BorderBrush}" 
								BorderThickness="{TemplateBinding BorderThickness}" 
								CornerRadius="2" 
								Opacity="0" />
						<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" 
										  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
										  Margin="{TemplateBinding Padding}" 
										  VerticalAlignment="{TemplateBinding VerticalContentAlignment}" 
										  RecognizesAccessKey="True"/>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="IsMouseOver" Value="True">
							<Setter Property="Opacity" TargetName="Chrome" Value="1"/>
							<Setter Property="Background" TargetName="Chrome" Value="{DynamicResource TabButtonOverBackground}" />
						</Trigger>
						<Trigger Property="IsPressed" Value="True">
							<Setter Property="Opacity" TargetName="Chrome" Value="1"/>
							<Setter Property="Background" TargetName="Chrome" Value="{DynamicResource TabButtonPressedBackground}" />
						</Trigger>
						<Trigger Property="IsEnabled" Value="false">
							<Setter Property="Foreground" Value="#ADADAD"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style x:Key="PathButtonStyle" TargetType="seui:PathButton" BasedOn="{StaticResource TabItemButtonStyle}">
		<Setter Property="EnabledFill" Value="#FF6495ED" />
		<Setter Property="DisabledFill" Value="#FF4364A0" />
		<Setter Property="PressedFill" Value="#FF4364A0" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="seui:PathButton">
					<Grid>
						<Border x:Name="Chrome" 
								SnapsToDevicePixels="true" 
								Background="{TemplateBinding Background}" 
								BorderBrush="{TemplateBinding BorderBrush}" 
								BorderThickness="{TemplateBinding BorderThickness}" 
								CornerRadius="2" 
								Opacity="0" />
						<Grid SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" 
							  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
							  Margin="{TemplateBinding Padding}" 
							  VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
							<Path x:Name="Path" 
								  Stretch="Fill" 
								  StrokeThickness="0.5" 
								  Stroke="#FF606060"
								  Fill="{TemplateBinding EnabledFill}" 
								  HorizontalAlignment="Stretch" 
								  VerticalAlignment="Stretch"
								  Data="{TemplateBinding Path}" />
						</Grid>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="IsMouseOver" Value="True">
							<Setter Property="Opacity" TargetName="Chrome" Value="1"/>
							<Setter Property="Background" TargetName="Chrome" Value="{DynamicResource TabButtonOverBackground}" />
						</Trigger>
						<Trigger Property="IsPressed" Value="True">
							<Setter Property="Opacity" TargetName="Chrome" Value="1"/>
							<Setter Property="Background" TargetName="Chrome" Value="{DynamicResource TabButtonPressedBackground}" />
						</Trigger>
						<Trigger Property="IsEnabled" Value="false">
							<Setter Property="Foreground" Value="#ADADAD"/>
						</Trigger>
						<Trigger Property="IsEnabled" Value="False">
							<Setter Property="Fill" TargetName="Path" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type seui:PathButton}}, Path=DisabledFill}"/>
						</Trigger>
						<Trigger Property="IsPressed" Value="True">
							<Setter Property="Fill" TargetName="Path" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type seui:PathButton}}, Path=PressedFill}"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

</ResourceDictionary>